package cn.test.quartz.job;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import cn.test.quartz.bean.ScheduleJob;
import cn.test.quartz.comment.TaskUtils;

import com.sun.istack.internal.logging.Logger;

/**
 * 计划任务执行处 无状态
 * @author 201507280134
 *
 */
public class QuartzJobFactory implements Job{

	public final Logger log = Logger.getLogger(this.getClass());

	public void execute(JobExecutionContext context)
			throws JobExecutionException {
		ScheduleJob scheduleJob = (ScheduleJob) context.getMergedJobDataMap().get("scheduleJob");
		TaskUtils.invokMethod(scheduleJob);
	}
	
}
